package com.liuyucheng.idea_springboot.spring;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Component;

//@Component
public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
        BeanDefinition lyc = configurableListableBeanFactory.getBeanDefinition("lyc");
        System.out.println("lyc = " + lyc);
        System.out.println("执行了我的处理器MyBeanFactoryPostProcessor");
    }
}
